package com.lifa.service.impl;
/**
 * 123
 */
import com.lifa.dao.ShangpinFenleiDao;
import com.lifa.entity.ShangpinFenlei;
import com.lifa.service.ShangpinFenleiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShangpinFenleiServiceImpl implements ShangpinFenleiService {
    @Autowired
    private ShangpinFenleiService shangpinFenleiService;
    @Autowired
    private ShangpinFenleiDao shangpinFenleiDao;

    /**
     * 查询全部
     * @return
     */
    @Override
    public List<ShangpinFenlei> list1() {
        return shangpinFenleiService.list1();
    }

    /**
     * 根据商品id删除商品信息
     * @param shangpinFenlei_Id
     * @return
     */
    @Override
    public int delete(int shangpinFenlei_Id) {
        return shangpinFenleiDao.delete(shangpinFenlei_Id);
    }

    /**
     * 添加商品
     * @param shangpinFenlei
     * @return
     */
    @Override
    public int insert(ShangpinFenlei shangpinFenlei) {
        return shangpinFenleiDao.insert(shangpinFenlei);
    }

    /**
     * 获取到商品分类id
     * @param shangpinFenlei_Id
     * @return
     */
    @Override
    public ShangpinFenlei queryId(int shangpinFenlei_Id) {
        return shangpinFenleiDao.queryId(shangpinFenlei_Id);
    }

    /**
     * 根据商品分类id修改信息
     * @param shangpinFenlei
     * @return
     */
    @Override
    public int update(ShangpinFenlei shangpinFenlei) {
        return shangpinFenleiDao.update(shangpinFenlei);
    }
}
